﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using System.Data;
using SSPharma.Model;
using SSPharma.Biz.NhanSu;

namespace SSPharma.ViewModel.NhanSu
{
   public class ThemNhanVienViewModel : ViewModelBase
    {
        public string _FormName;

        #region Valiable definition
        private ObservableCollection<cboCommon> _cboQuanHe;
        private string _TextQuanHe;
        #endregion

        #region contractor

        public ThemNhanVienViewModel()
        {
            _cboQuanHe = new ObservableCollection<cboCommon>();
            _TextQuanHe = "";
            Load_DanhMucQuanHe();
        }

        #endregion

        #region Properties

        public string FormName
        {
            get
            {
                return _FormName;
            }
            set
            {
                if (value == _FormName)
                    return;
                _FormName = value;
                base.OnPropertyChanged("FormName");
            }
        }
        public string TextQuanHe
        {
            get { return _TextQuanHe; }
            set
            {
                if (value == _TextQuanHe)
                    return;

                _TextQuanHe = value;

                base.OnPropertyChanged("TextQuanHe");
            }
        }

        public ObservableCollection<cboCommon> cboQuanHe
        {
            get
            {
                return _cboQuanHe;
            }
            set
            {
                _cboQuanHe = value;
            }
        }
        #endregion

        #region Public Methods
        private void Load_DanhMucQuanHe()
        {
            BizThemNhanVien _BizThemNhanVien = new BizThemNhanVien();
           cboQuanHe = new ObservableCollection<cboCommon>(_BizThemNhanVien.fl_DSDanhMuc_DanToc());
        }
        #endregion
    }
}
